

var http = require("http")

function start(route, handle){
  function onRequest(request, response){
    var postData =""
    request.setEncoding("utf8")
    route(handle, request.url, response, postData)
  }

  http.createServer(onRequest).listen(8888)
  console.log("Server has started.")
}

exports.start = start